<%@ page import="com.mewpipe.entity.*" %>
<% 
boolean Tlog =false;
boolean log =true;
String contextPath = getServletContext().getContextPath();

HttpSession Session= request.getSession();
UserSession user = (UserSession) Session.getAttribute("UserSession");
if( user==null ){
	log=false;
	
}
else{
	
		if (user.getType_acc() == 2){
		Tlog=true;
	}
}


%>


<div id="templatemo_header_wrapper">

	<div id="templatemo_header">
    
    	<div id="site_title">
            <h1><a href="http://www.templatemo.com" target="_parent">
                <img src="images/oie_transparent50.png" alt="Web Templates">
                <span>MewPipe</span>
            </a></h1>
        </div>
        
        <div id="search_box">
            <form action="search" method="post">
                <input type="text" value="" name="searchfield" size="10" id="searchfield" title="searchfield" onfocus="clearText(this)" onblur="clearText(this)">
                <input type="submit" name="Search" value="Search" alt="Search" id="searchbutton" title="Search">
            </form>
        </div>
        
        <div class="cleaner"></div>
	</div><!-- end of header -->
    
    	<div id="templatemo_menu">
            <ul>
                  <% if(log) { %>
		<li><a id="PseudoAccueil" href="#">Bonjour  : <%= user.getPseudo() %></a></li>
		<li><a href="/MewPipeProject/video.jsp">Ajouter une video</a></li>
		<li><a href="/MewPipeProject/GetUserInfo">Mon Compte</a></li>
		<li><a href="/MewPipeProject/Logout">Logout</a></li>

		<% if(Tlog) { %>
		<li><a href="/MewPipeProject/AdminContent/GestionUser">AdminPanel</a></li>
		<% } %>
		
		<% } else { %>

				<li><a href="/MewPipeProject/Index">Accueil</a></li>
                <li><a href="/MewPipeProject/Login.jsp">Login</a></li>
                <li><a href="/MewPipeProject/signin.jsp">Register</a></li>
		

<% } %>
            </ul>    	
    	</div><!-- end of templatemo_menu -->
    	
    	
    	

</div>